<%@ page language="java" import="logic.*,java.util.*" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>SOS PLANET - Ayuda al mundo</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
</head>
<body>
<div id="wrapper">
<div class="content">
<div id="header">
	<%@ include file = "includes/header.jsp" %>
</div><!-- header -->

<div id="menu">      
	<%@ include file = "includes/menu.html" %>
</div><!-- menu -->
           
<div class="productform">
<h2>Introduzca los datos del articulo que desea donar </h2>
<form action="FrontController?res=donate.jsp" method="post">
<label><span class="highlight">Nombre: </span>
<input type="text" name="name" id="name" /> </label>
<label><span class="highlight">Descripcion: </span>
<textarea name="description"></textarea> </label>
<label><span class="highlight">Precio: </span>
<input type="text" name="price" id="price" /> </label>
<label><span class="highlight">Categoria: </span>
<select name="category" >
	<option value="0">Seleccione una categoria</option>
	
	<%
	IFinder fd = new Finder();
	List<String> ls = fd.getCategories();
	for(String s: ls){
		%>
		<option value="<%= s %>"><%= s %></option>
		<%
	}
	%> </select></label> 
<label><span class="highlight">Destino: </span>
<select name="destiny" >
	<option value="0">Seleccione un destino</option>
	<%
	List<Destination> ld = DestinationList.getInstance().getDestinations();
	for(Destination d: ld){
		%>
		<option value="<%= d.getId() %>"><%= d.getName() %></option>
		<%
	}
	%> </select></label>

<%
String idUser = "";
if(usHead != null){
	idUser = usHead.getId();
}
%>
<input type="hidden" name="iddonnor" value="<%=idUser%>" />
<label>
<input class="buyproduct" name="donatebutton" type="submit" value="Donar" />
</label>
</form>
</div>

<div id="footer">
	<%@ include file = "includes/footer.html" %>
</div><!--footer-->

</div><!--content-->
</div><!--wrapper-->
</body>
</html>